/**
 * Created by LJY on 2017/3/18.
 */
public class RPG2 extends Role2{
    public static void main(String[] args) {
        SwordsMan2 swordsMan2=new SwordsMan2();
        swordsMan2.setName("Justin");
        swordsMan2.setLevel(1);
        swordsMan2.setBlood(200);

        Magician2 magician2=new Magician2();
        magician2.setName("Monica");
        magician2.setLevel(1);
        magician2.setBlood(100);

        showBlood(swordsMan2);
        showBlood(magician2);
    }
    static void showBlood(Role2 role){
        System.out.printf("%s血量 %d%n",role.getName(),role.getBlood());

    }
}
